package api.feign;

import api.config.OpenFeignConfig;
import com.lyx.common.param.CouponAdd;
import com.lyx.common.param.CouponAudit;
import com.lyx.common.param.UserCouponAdd;
import com.lyx.common.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * --- Be Humble and Hungry ---
 *
 * @author McMeloxD
 * @date 2024/8/14
 * @desc
 */
@FeignClient(value = "lyx-coupon",configuration = OpenFeignConfig.class)
public interface CouponService {
    @PostMapping("/server/coupon/save")
    R save(@RequestBody CouponAdd add);
    @PostMapping("/server/coupon/audit")
    R audit(@RequestBody CouponAudit audit);
    @GetMapping("/server/coupon/all")
    R all(@RequestParam("status") String status);

    @PostMapping("server/usercoupon/add")
    R add(@RequestBody UserCouponAdd add);
    @GetMapping("server/usercoupon/my")
    R my(@RequestParam("uid") Integer uid);

    @GetMapping("server/couponLog/logs")
    R logs(@RequestParam("uid") Integer uid);
}
